const token = 'appToken';


// 控制 权限 token
export function setToken(value: string) {
  wx.setStorageSync(token, value);
}

/**
 * 控制 权限 token
 * @returns
 */
export function getToken(): string {
  if (wx.getStorageSync(token)) {
    return wx.getStorageSync(token) + '';
  } else {
    return '';
  }
}

export function removeToken() {
  wx.removeStorageSync(token);
}

export function logout() {
  removeToken();
}